const { ignore, error, MAX_SPECIFICITY } = require('./consts');

module.exports = {
  rules: {
    // Possible Errors
    'getter-return': error,
    'no-cond-assign': [error, 'except-parens'],
    'no-console': error,
    'no-constant-condition': error,
    'no-control-regex': error,
    'no-debugger': error,
    'no-dupe-args': error,
    'no-dupe-keys': error,
    'no-duplicate-case': error,
    'no-empty-character-class': error,
    'no-empty': error,
    'no-ex-assign': error,
    'no-extra-boolean-cast': error,
    'no-func-assign': error,
    'no-inner-declarations': error,
    'no-invalid-regexp': error,
    'no-irregular-whitespace': error,
    'no-negated-in-lhs': error,
    'no-obj-calls': error,
    'no-regex-spaces': error,
    'no-sparse-arrays': error,
    'no-unexpected-multiline': error,
    'no-unreachable': error,
    'use-isnan': error,
    'valid-typeof': error,
    /// Best Practices
    'accessor-pairs': error,
    'array-callback-return': error,
    'block-scoped-var': error,
    complexity: [error, MAX_SPECIFICITY],
    'consistent-return': error,
    curly: [error, 'all'],
    'default-case': error,
    'dot-notation': error,
    eqeqeq: [error, 'allow-null'],
    'guard-for-in': error,
    'no-alert': error,
    'no-caller': error,
    'no-div-regex': error,
    'no-else-return': ignore,
    'no-empty-pattern': error,
    'no-eq-null': ignore,
    'no-eval': error,
    'no-extend-native': error,
    'no-extra-bind': error,
    'no-fallthrough': error,
    'no-implicit-coercion': ignore,
    'no-implied-eval': error,
    'no-invalid-this': ignore,
    'no-iterator': error,
    'no-labels': error,
    'no-lone-blocks': error,
    'no-loop-func': error,
    'no-magic-numbers': [error, { ignore: [-1, 0, 1] }],
    'no-multi-str': error,
    'no-native-reassign': error,
    'no-new-func': error,
    'no-new-wrappers': error,
    'no-new': error,
    'no-octal-escape': error,
    'no-octal': error,
    'no-param-reassign': error,
    'no-process-env': ignore,
    'no-proto': error,
    'no-redeclare': error,
    'no-return-assign': error,
    'no-script-url': error,
    'no-self-compare': error,
    'no-sequences': error,
    'no-throw-literal': error,
    'no-unused-expressions': error,
    'no-useless-call': error,
    'no-useless-concat': error,
    'no-void': error,
    'no-warning-comments': ignore,
    'no-with': error,
    radix: error,
    'vars-on-top': error,
    yoda: error,
    /// Strict Mode
    strict: [error, 'never'],
    /// Variables
    'init-declarations': ignore,
    'no-catch-shadow': error,
    'no-delete-var': error,
    'no-label-var': error,
    'no-shadow-restricted-names': error,
    'no-shadow': error,
    'no-undef-init': error,
    'no-undef': error,
    'no-undefined': ignore,
    'no-unused-vars': [error, { ignoreRestSiblings: true }],
    'no-use-before-define': [error, 'nofunc'],
  },
};
